Skip to content

replaced icafe with metadata extractor #2546

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Mar 11, 2019

Conversation

vanshikaarora
Copy link
Contributor

Removed the icafe library and shifted to metadata extractor

Fixes #2518 Migrate from Icafe to metadata-extractor

Changes made

  • Modified ReadFBMD.java
  • Added contentUri to load image

@@ -90,7 +90,8 @@ dependencies {
//swipe_layout
implementation 'com.daimajia.swipelayout:library:1.2.0@aar'
implementation 'com.nineoldandroids:library:2.4.0'
implementation files('libs/icafe-1.1-SNAPSHOT.jar')
//metadata extractor
implementation 'com.drewnoakes:metadata-extractor:2.11.0'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this dependency already exists. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am sorry I'll remove it

@@ -20,7 +23,10 @@

/**
* Methods for pre-processing images to be uploaded
*/
*//*if (dataInBytes[0] == 70 && dataInBytes[1] == 66 && dataInBytes[2] == 77 && dataInBytes[3] == 68) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this comment intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was added mistakenly I'll remove it

@@ -428,6 +431,34 @@ public String getFileName() {
public Place getPlace() {
return place;
}

public Uri getContentUri() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not required. Instead of generating content uri here, simply pass it to UploadItem from UploadableFile.

@vanshikaarora
Copy link
Contributor Author

@maskaravivek I have updated the PR. Kindly review :)

@codecov-io
Copy link

Codecov Report

Merging #2546 into master will increase coverage by 0.02%.
The diff coverage is 22.72%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2546      +/-   ##
=========================================
+ Coverage    5.89%   5.91%   +0.02%     
=========================================
  Files         258     258              
  Lines       12310   12319       +9     
  Branches     1110    1113       +3     
=========================================
+ Hits          726     729       +3     
- Misses      11525   11531       +6     
  Partials       59      59
Impacted Files Coverage Δ
...fr/free/nrw/commons/filepicker/UploadableFile.java 1.61% <0%> (-0.03%) ⬇️
...main/java/fr/free/nrw/commons/upload/ReadFBMD.java 0% <0%> (ø) ⬆️
...ree/nrw/commons/upload/ImageProcessingService.java 84.74% <100%> (+0.53%) ⬆️
...n/java/fr/free/nrw/commons/upload/UploadModel.java 31.84% <25%> (+0.02%) ⬆️
...free/nrw/commons/campaigns/CampaignsPresenter.java 0% <0%> (ø) ⬆️
...w/commons/contributions/ContributionsFragment.java 0% <0%> (ø) ⬆️
...va/fr/free/nrw/commons/utils/SwipableCardView.java 0% <0%> (ø) ⬆️
...va/fr/free/nrw/commons/filepicker/PickedFiles.java 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fd82c8a...177ae86. Read the comment docs.

@maskaravivek maskaravivek merged commit 6389b35 into commons-app:master Mar 11, 2019
@vanshikaarora
Copy link
Contributor Author

Thanks for approving the PR @maskaravivek :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants